
<div class="layuimini-container">
	<form class="layui-form">
            <div class="layui-form-item">
                <label class="layui-form-label">课程名称：</label>
                <div class="layui-input-block">
                    <input type="text" name="name" value="" class="layui-input field-name" placeholder="请输入课程名称">
                    <!-- <tip>填写课程名称。</tip> -->
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">价格：</label>
                <div class="layui-input-inline">
                    <input type="text" name="price" value="" class="layui-input field-price" placeholder="0.00">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">单位：</label>
                <div class="layui-input-block">
                    <div class="layui-input-inline" style="width: 100%;">
                        <select name="unit" class="field-unit">
                            <option value="">请选择单位</option>
                            <option value="0">年</option>
                            <option value="1">季</option>
                            <option value="2">月</option>
                            <option value="3">周</option>
                            <option value="4">天</option>
                            <option value="5">课时</option>
                            <option value="6">学期</option>
                        </select>
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">课时：</label>
                <div class="layui-input-inline">
                    <input type="number" name="minute_hour" value="" class="layui-input field-minute_hour"  placeholder="0">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">校区：</label>
                <div class="layui-input-block">
                    <div class="layui-input-inline" style="width: 64%;">
                        <select name="campus_id" class="field_campus_id">
                            <option value="">请选择校区</option>
                            {volist name="campusList" id="name" key="id"}
                            <option value="{$id}">{$name}</option>
                            {/volist}
                        </select>
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">专业：</label>
                <div class="layui-input-block">
                    <div class="layui-input-inline"  style="width: 64%;">
                        <select name="major_id" lay-search="" class="field-major_id">
                            <option value="">请选择专业</option>
                            {volist name="majorList" id="name" key="id"}
                            <option value="{$id}">{$name}</option>
                            {/volist}
                        </select>
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">紧急联系人：</label>
                <div class="layui-input-block">
                    <input type="radio" name="has_phone_too" class="field-has_phone_too" value="0" title="不需要" checked>
                    <input type="radio" name="has_phone_too" class="field-has_phone_too" value="1" title="需要">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">状态：</label>
                <div class="layui-input-block">
                    <input type="radio" name="status" class="field-status" value="1" title="启用" checked>
                    <input type="radio" name="status" class="field-status" value="0" title="禁用">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">排序：</label>
                <div class="layui-input-inline">
                    <input type="number" name="sort" value="99" class="layui-input field-sort">
                </div>
            </div>

            <div class="layui-form-item">
                <div class="layui-input-block">
                    <button class="layui-btn layui-btn-normal" lay-submit lay-filter="saveBtn">确认保存</button>
                    <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                </div>
            </div>
        </form>
</div>

<script>
    // 扩展模块  config的设置是全局的
    layui.config({
        base: '/static/crm/js/modules/' //假设这是你存放拓展模块的根目录
    });

    layui.use(['form','jquery', 'layer', 'func'], function () {
        var form = layui.form,
            layer = layui.layer,
            $ = layui.jquery;

        layui.func.assign({:json_encode($data)});   // 解析数据
    });
</script>
</body>
</html>